package com.ruoyi.business.pay.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.pay.mapper.ThirdPaymentAgencyMapper;
import com.ruoyi.business.pay.domain.ThirdPaymentAgency;
import com.ruoyi.business.pay.service.IThirdPaymentAgencyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 非银行第三方支付机构（拿到支付许可证的）Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-11-11
 */
@Service
public class ThirdPaymentAgencyServiceImpl implements IThirdPaymentAgencyService 
{
    @Autowired
    private ThirdPaymentAgencyMapper thirdPaymentAgencyMapper;

    /**
     * 查询非银行第三方支付机构（拿到支付许可证的）
     * 
     * @param id 非银行第三方支付机构（拿到支付许可证的）主键
     * @return 非银行第三方支付机构（拿到支付许可证的）
     */
    @Override
    public ThirdPaymentAgency selectThirdPaymentAgencyById(Long id)
    {
        return thirdPaymentAgencyMapper.selectThirdPaymentAgencyById(id);
    }

    /**
     * 查询非银行第三方支付机构（拿到支付许可证的）列表
     * 
     * @param thirdPaymentAgency 非银行第三方支付机构（拿到支付许可证的）
     * @return 非银行第三方支付机构（拿到支付许可证的）
     */
    @Override
    public List<ThirdPaymentAgency> selectThirdPaymentAgencyList(ThirdPaymentAgency thirdPaymentAgency)
    {
        return thirdPaymentAgencyMapper.selectThirdPaymentAgencyList(thirdPaymentAgency);
    }

    /**
     * 新增非银行第三方支付机构（拿到支付许可证的）
     * 
     * @param thirdPaymentAgency 非银行第三方支付机构（拿到支付许可证的）
     * @return 结果
     */
    @Override
    public int insertThirdPaymentAgency(ThirdPaymentAgency thirdPaymentAgency)
    {
        return thirdPaymentAgencyMapper.insertThirdPaymentAgency(thirdPaymentAgency);
    }

    /**
     * 修改非银行第三方支付机构（拿到支付许可证的）
     * 
     * @param thirdPaymentAgency 非银行第三方支付机构（拿到支付许可证的）
     * @return 结果
     */
    @Override
    public int updateThirdPaymentAgency(ThirdPaymentAgency thirdPaymentAgency)
    {
        return thirdPaymentAgencyMapper.updateThirdPaymentAgency(thirdPaymentAgency);
    }

    /**
     * 批量删除非银行第三方支付机构（拿到支付许可证的）
     * 
     * @param ids 需要删除的非银行第三方支付机构（拿到支付许可证的）主键
     * @return 结果
     */
    @Override
    public int deleteThirdPaymentAgencyByIds(String ids)
    {
        return thirdPaymentAgencyMapper.deleteThirdPaymentAgencyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除非银行第三方支付机构（拿到支付许可证的）信息
     * 
     * @param id 非银行第三方支付机构（拿到支付许可证的）主键
     * @return 结果
     */
    @Override
    public int deleteThirdPaymentAgencyById(Long id)
    {
        return thirdPaymentAgencyMapper.deleteThirdPaymentAgencyById(id);
    }
}
